package com.cloud.pet.ops.controller.op;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.cloud.commons.Result;
import com.cloud.pet.api.manager.dc.PetDeviceManager;
import com.cloud.pet.api.req.dc.PetDeviceReq;

/**
 * 运维员工
 * 
 * @author lw
 * @date 2024/07/17
 */
@RestController
@RequestMapping("device")
public class DeviceController {
    @Resource
    private PetDeviceManager petDeviceManager;

    /** 分页查询 运维人员的设备 **/
    @PostMapping(value = "/pageEmpDevice")
    public Result<?> pageEmpDevice(@RequestBody PetDeviceReq req) {
        return petDeviceManager.pageEmpDevice(req);
    }
    
    /** 查询运维人员服务的设备详情 **/
    @PostMapping(value = "/getEmpDevice")
    public Result<?> getEmpDevice(@RequestBody PetDeviceReq req) {
        return petDeviceManager.getEmpDevice(req.getSn(), req.getEmpId());
    }
}
